
<!--------------------------------------------刘猛------------------------------------------------------------------>
<template>
    <el-container style="height: 600px; border: 1px solid #eee">
        <el-header style="text-align:right; font-size: 20px;height: 200px; padding-top:40px">
            <el-form inline="ture" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                <el-form-item label="订单号"  prop="order_sn">
                    <el-input v-model="ruleForm.order_sn" size="small" style="width: 200px" placeholder="请选择配送中心"></el-input>
                </el-form-item>
                <el-form-item label="配送中心" prop="distribution_center_name">
                    <el-select v-model="ruleForm.distribution_center_name" placeholder="请选择配送中心" size="small">
                        <el-option label="上海" value="shanghai"></el-option>
                        <el-option label="北京" value="beijing"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="库房" prop="storage_room_name">
                    <el-select v-model="ruleForm.storage_room_name" placeholder="请选择库房" size="small">
                        <el-option label="C1区A2座" value="shanghai"></el-option>
                        <el-option label="C1区A3座" value="beijing"></el-option>
                    </el-select>
                </el-form-item>
                <br/>
                <el-form-item  >
                    <el-button type="primary" @click="submitForm('ruleForm')"  style="text-align:left" >查询</el-button>

                </el-form-item>
            </el-form>
        </el-header>
        <el-main>
            <el-table
                    :data="orderdata"
                    border
                    style="width: 100%">
                <el-table-column
                        fixed
                        prop="order_sn"
                        label="订单号"
                        width="200">
                </el-table-column>
                <el-table-column
                        prop="distribution_center_name"
                        label="配送中心"
                        width="150">
                </el-table-column>
                <el-table-column
                        prop="storage_room_name"
                        label="库房"
                        width="150">
                </el-table-column>
                <el-table-column
                        prop="finish_time"
                        label="完成时间"
                        width="200">
                </el-table-column>
                <el-table-column
                        prop="creation_time"
                        label="创建时间"
                        width="200">
                </el-table-column>
                <el-table-column
                        fixed="right"
                        label="操作"
                        width="100">
                    <template slot-scope="scope">
                        <el-button @click="handleClick(scope.row)" type="text" >查看</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <P></P>
            <el-pagination
                    background
                    @current-change="handleCurrentChange"
                    :page-size="5"
                    layout="total, prev, pager, next, jumper"
                    :total="20">
            </el-pagination>

        </el-main>
    </el-container>
</template>

<script>
    export default {
        data() {
            return {
                ruleForm: {
                    order_sn: '',
                    distribution_center_name: '',
                    storage_room_name: ''
                },
                orderdata:[],
                rules: {
                    distribution_center_name: [
                        {  message: '请选择配送中心', trigger: 'change' }
                    ],
                    storage_room_name: [
                        {  message: '请选择日期', trigger: 'change' }
                    ]
                }
            };
        },
        methods: {
            submitForm(formName) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        alert('submit!');
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            }
        }
    }
</script>




